package com.smedi.ismedi.inmail.core.port.adapter.service;

import com.smedi.ismedi.inmail.core.port.adapter.service.dto.AccessTokenRequest;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * 钉钉接口
 *
 * @author jiangqinxuan
 * @date 2021/07/27
 */
@FeignClient(name = "ismedi-dingTalk", url = "https://api.dingtalk.com/v1.0")
public interface DingTalkService {
    /**
     * 获取AccessToken
     *
     * @param accessTokenRequest AccessToken获取请求
     * @return accessToken
     */
    @PostMapping(value = "/oauth2/accessToken")
    String getAccessToken(@RequestBody AccessTokenRequest accessTokenRequest);
//    /**
//     * 获取AccessToken
//     *
//     * @param accessTokenRequest AccessToken获取请求
//     * @return accessToken
//     */
//    @PostMapping(value = "/oauth2/accessToken")
//    String getAccessToken(@RequestBody AccessTokenRequest accessTokenRequest);
}
